package com.infore.siteManagement.entity;

import java.io.Serializable;
import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * The persistent class for the AREA database table.
 * llf
 * 区域
 */
@Entity
@Table(name = "AREA")
@NamedQuery(name="Area.findAll", query="SELECT a FROM Area a")
@NamedEntityGraph(name="area_view",attributeNodes={@NamedAttributeNode("areaLevel")})
public class Area implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="AREA_ID")
	@GeneratedValue(generator = "uuidGenerator")
	@GenericGenerator(name = "uuidGenerator", strategy = "uuid") // UUID生成策略
	private String areaId;

	/** 区域编码**/
	@Column(name="AREA_CODE")
	private String areaCode;

	/** 区域等级**/
	@ManyToOne(cascade = CascadeType.MERGE)
	@JoinColumn(name = "AREA_LEVEL_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	private AreaLevel areaLevel;

	/** 区域名称**/
	@Column(name="AREA_NAME")
	private String areaName;

	/** 父标识**/
	@Column(name="PARENT_ID")
	private String parentId;

	/** 排序**/
	@Column(name="SORT")
	private Integer sort;
	
	/** 备注**/
	@Column(name="REMARK")
	private String remark;
	
	/** 区域水质目标等级**/
	@Column(name="AIM_WATER_LEVEL")
	private String aimWaterLevel;

	public Area() {
	}

	public String getAreaId() {
		return this.areaId;
	}

	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}

	public String getAreaCode() {
		return this.areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public AreaLevel getAreaLevel() {
		return areaLevel;
	}

	public void setAreaLevel(AreaLevel areaLevel) {
		this.areaLevel = areaLevel;
	}

	public String getAreaName() {
		return this.areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	public String getParentId() {
		return this.parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public Integer getSort() {
		return this.sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getAimWaterLevel() {
		return aimWaterLevel;
	}

	public void setAimWaterLevel(String aimWaterLevel) {
		this.aimWaterLevel = aimWaterLevel;
	}


}